package com.yingluo.abacus.plantform.docs.domain.app.hibenate;

import com.yingluo.abacus.boot.core.data.hibernate.dao.AbstractCCEntity;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name = "demo_extend_t") 
public class ExtendEntity extends AbstractCCEntity {
	private static final long serialVersionUID = 1L; 

	TestEntity test;
	

	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "testId")
	public TestEntity getTest() {
		return test;
	}

	public void setTest(TestEntity test) {
		this.test = test;
	}

	@Column(name = "create_date" )
	public Date getCreateDate() {
		return this.createDate;
	}


	@Column(name = "update_date")
	public Date getUpdateDate() {
		return this.updateDate;
	}

	@Column(name = "delete_date")
	public Date getDeleteDate() {
		return this.deleteDate;
	}

	@Column(name = "create_Login_id" , length = 64)
	public String getCreateLoginId() {
		return this.createLoginId;
	}

	@Column(name = "update_Login_id" , length = 64)
	public String getUpdateLoginId() {
		return this.updateLoginId;
	}

	@Column(name="delete_logic" ,columnDefinition = "boolean default false")
	public Boolean getDeleteLogic() {
		return this.deleteLogic;
	}
 
	@Id
	@GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
	@Column(name = "table_id", length = 64)
	public String getExtendId() {
		return this.tableId;
	}

	public void setExtendId(String Id) {
		  this.tableId=Id;
	}

	@Transient
	public String getTableId() {
		return this.tableId;
	}


}
